package cn.itsource.system.mapper;

import cn.itsource.system.domain.Role;
import cn.itsource.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zcj
 * @since 2023-11-06
 */
public interface RoleMapper extends BaseMapper<Role> {

    Role selectBySn(String sn);

    Role selectRole(Role role);

    void saveRoleAndMenu(@Param("id") Long id,@Param("menus") List<Long> menus);

    void saveRoleAndPermission(@Param("id")Long id,@Param("authoritys") List<Long> authoritys);

    List<Long> getPermissionByRoleId(Long roleId);

    List<Long> getMenuByRoleId(Long roleId);
}
